package com.easyCode.sqlMapper.template;

import com.easyCode.sqlMapper.mapInfo.DataBaseMapInfo;

import java.io.FileNotFoundException;

/**
 * @author 大忽悠
 * @create 2022/12/3 15:56
 */
public abstract class SqlTemplate {
    protected final SqlTemplateConfig sqlTemplateConfig;

    public SqlTemplate(SqlTemplateConfig sqlTemplateConfig) {
        this.sqlTemplateConfig = sqlTemplateConfig;
    }

    /**
     * @param dataBaseMapInfo 根据数据库信息来进行模板渲染
     */
    public abstract void render(DataBaseMapInfo dataBaseMapInfo);

    public abstract void addTemplate(String templateFileName,RenderHandler renderHandler);

    public abstract void removeTemplate(String templateFileName);

    public abstract void addDefaultTemplate(String templateFileName,RenderHandler renderHandler);

    public abstract void removeDefaultTemplate(String templateFileName);
}
